<?php
  include("handle/config.php");
?>
<?php
	session_start();
	ob_start();
?>
<title>Quản lý hội viên</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="imagetoolbar" content="no" />

<link rel="stylesheet" href="styles/layout.css" type="text/css" />
<!--<script type="text/javascript" src="scripts/jquery-1.4.1.min.js"></script>-->
<script type="text/javascript" src="js template/jquery-1.11.0.js"></script>
<script type="text/javascript" src="scripts/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="scripts/jquery.timers.1.2.js"></script>
<!--<script type="text/javascript" src="scripts/jquery.galleryview.2.1.1.min.js"></script>
<script type="text/javascript" src="scripts/jquery.galleryview.setup.js"></script>-->
<script type="text/javascript" src="scripts/jquery.galleryview-3.0-dev.js"></script>
<link type="text/css" rel="stylesheet" href="styles/jquery.galleryview-3.0-dev.css" />


<!-- jquery autocomplete cho ma hoi vien-->
<link type="text/css" href="css template/jquery-ui.css" rel="stylesheet">
<link type="text/css" href="css template/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="styles/custom.css" type="text/css" />

<script type="text/javascript" src="js template/jquery-ui.min.js"></script>

<script>

	//autocomplete cho mã hội viên
	var mahvtim = [{ value: "", label: "" }];
	<?php
			include("handle/config.php");
			$sql = "SELECT * FROM HOIVIEN";
			$result=mysqli_query($con,$sql);
			while($row = mysqli_fetch_array($result) )
			{
				echo "mahvtim.push({value: '".$row['MAHV']."', label: '".$row['MAHV']."'} );";
			}
	?>
	$(function() {
		$("#mahvtim").autocomplete({
			source: mahvtim
		});
		
	});
	// autocomplete cho tên hội viên
	var tenhvtim = [{ value: "", label: "" }];
	<?php
			include("handle/config.php");
			$sql = "SELECT DISTINCT HOTEN FROM HOIVIEN";
			$result=mysqli_query($con,$sql);
			while($row = mysqli_fetch_array($result))
			{
				echo "tenhvtim.push({value: '".$row['HOTEN']."', label: '".$row['HOTEN']."'} );";
				
			}
	?>
	$(function() {
		$("#tenhvtim").autocomplete({
			source: tenhvtim
		});
		
	});
</script>
<link rel="stylesheet" href="styles/custom.css" type="text/css" />
<!-- custom link -->
<script type="text/javascript" src="script sources/XemDSHV.js"></script>
</head>
<body id="top">
<!-- ####################################################################################################### -->
<!--#include virtual=".html" -->
	<?php $qlhv ="active"; include("header.html"); ?>
	<div class="wrapper">
	 <div class="container">
		<?php 
			switch($_GET['content'])
			{
				case "xemdshv": include("html sources/quan ly hoi vien/xemdshv.html"); break; //trang danh sách các hội viên bao gồm chức năng tìm kiếm hội viên
				case "themhoivien": include("html sources/quan ly hoi vien/themhoivien.html"); break;
				case "thongtinhvdathem": include("html sources/quan ly hoi vien/ThongTinHoiVienThem.html"); break; //trang thông thin hội viên sau khi được thêm bao gồm thông tin tài khoản
				case "capnhattthv": include("html sources/quan ly hoi vien/CapNhatTTHV.html"); break;
				case "dshvch": include("html sources/quan ly hoi vien/DSHVCuaChiHoi.html"); break;//TODO: set lại on delete cascade cho tất cả khóa ngoại tham chiếu tới bảng hội viên nếu muốn xóa 1 hội viên
				case "thongtinhoivien": include("html sources/quan ly hoi vien/ThongTinHoiVien.html"); break;
			}
		?>
		</div>
	</div>
</body>
</html>
